<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 日常收支列表</title>
    <link rel="shortcut icon" href="../../content/static/img/favicon.ico">
    <link href="../../content/css/common_modal.css" rel="stylesheet">
    <link href="../../content/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="../../content/js/lib/vue/select2.min.css" rel="stylesheet">
    <link href="../../content/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="../../content/static/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="../../content/js/lib/calendar/calendar.css" rel="stylesheet">
    <link href="../../content/js/lib/calendar/scrollbar.css" rel="stylesheet">
    <link href="../../content/static/css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="../../content/static/js/plugins/bootstrap-fileinput/css/fileinput.css" media="all" rel="stylesheet" />
    <style>
        .fa-female:before {
            color: #fb7cd5;
        }
        .fa-location-arrow:before {
            color: rebeccapurple;
        }
        .fa-mobile-phone:before, .fa-mobile:before{
            color: black;
        }
        .fa-map-marker:before {
            color: #1ab394;
        }
        table-th{
            font-size: 12px;
            font-family: tahoma, "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
            line-height: 1.42857143;
            color: #333;
            background-color: #f5f5f5;
        }
        table tr{ height:40px;}
        .bill-tips>li{
            margin-top: 20px;
        }
    </style>
</head>

<body class="content-container">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <ol class="breadcrumb">
                        <li><a>收支</a></li>
                        <li><a>日常收支</a></li>
                    </ol>
                </div>
                <div class="content-wrapper">
                    <div class="search-condition">
                        <div>
                            <div class="filter-wrapper">
                                <ul class="clearfix">
                                    <li class="filter-item ">
                                        <label>单据单号</label>
                                        <div>
                                            <div class="fill-wrapper">
                                                <input id="serialNumber" type="text" class="fill-item">
                                            </div>
                                        </div>
                                    </li>
                                    <li class="filter-item ">
                                        <label>制单日期</label>
                                        <div>
                                            <div class="fill-wrapper fill-wrapper-auto">
                                                <input id="costTimeStart" type="text" class="fill-item timeChoose  revision-time"
                                                    readonly="readonly">
                                            </div>
                                            <div class="fill-desc">到</div>
                                            <div class="fill-wrapper fill-wrapper-auto">
                                                <input id="costTimeEnd" type="text" class="fill-item timeChoose  revision-time"
                                                    readonly="readonly">
                                            </div>
                                        </div>
                                    </li>
                                    <li class="filter-item ">
                                        <label>制单人</label>
                                        <div>
                                            <div class="fill-wrapper">
                                                <input id="serialNumber" type="text" class="fill-item">
                                            </div>
                                        </div>
                                    </li>
                                    <li class="filter-item ">
                                        <label>账目类型</label>
                                        <div>
                                            <select v-select2 id="accounts">
                                                <option value='0'>全部</option>
                                                <option value='0'>工资</option>
                                                <option value='0'>通讯费</option>
                                                <option value='0'>电费</option>
                                                <option value='0'>水费</option>
                                                <option value='0'>基建</option>
                                                <option value='0'>燃气费</option>
                                                <option value='0'>福利费</option>
                                                <option value='0'>交通费</option>
                                                <option value='0'>招待费</option>
                                                <option value='0'>商务费</option>
                                                <option value='0'>出差补贴</option>
                                                <option value='0'>住宿费</option>
                                                <option value='0'>其他收入</option>
                                                <option value='0'>其他支出</option>
                                            </select>
                                        </div>
                                    </li>
                                    <li class="filter-item ">
                                        <label>结算账户</label>
                                        <div>
                                            <select id="status" v-select2 class="fill-wrapper">
                                                <option value='0'>全部</option>
                                                <option value='1'>建设银行</option>
                                                <option value='2'>中国银行</option>
                                                <option value='2'>工商银行</option>
                                                <option value='2'>农业银行</option>
                                                <option value='2'>现金</option>
                                            </select>
                                        </div>
                                    </li>
                                    <li class="filter-item ">
                                        <label>收支类型</label>
                                        <div>
                                            <select id="comeType" v-select2 class="fill-wrapper">
                                                <option value='0'>全部</option>
                                                <option value='1'>收入</option>
                                                <option value='2'>支出</option>
                                            </select>
                                        </div>
                                    </li>
                                    <li class="filter-item">
                                        <a class="revision-btn revision-btn-search">搜索</a>
                                        <a href="javascript:;" class="more">更多<i class="revision-icon-more"></i></a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12" style="padding: 12px 0px 12px 0px;">
                        <div class="alert alert-info" style="margin-bottom: 0px">
                            <a class="revision-btn" v-on:click="addShow()">新增收支</a>&nbsp;&nbsp;
                            <a class="revision-btn" v-on:click="exportShow()">导出</a>&nbsp;&nbsp;
                            <span>总条数：<span>12 条</span></span>
                        </div>
                    </div>
                    <table class="table table-hover table-bordered">
                        <thead style="background: #f5f5f5;">
                            <tr>
                                <th>序号</th>
                                <th>单据编号</th>
                                <th>制单日期</th>
                                <th>账目类型</th>
                                <th>收支类型</th>
                                <th>金额</th>
                                <th>收支账户</th>
                                <th>制单人</th>
                                <th>审核状态</th>
                                <th>备注</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>1</td>
                                <td>ZCD20181240004</td>
                                <td>2018-12-20</td>
                                <td>工资</td>
                                <td class="amount">支出</td>
                                <td class="amount">100,000,0.00</td>
                                <td>
                                    <a href="javascript:;">建设银行</a>
                                </td>
                                <td>财务</td>
                                <td>审批完成
                                    <div>
                                        <a class="text-navy" href="javascript:;" v-on:click="approvalShow()">审批进度</a>
                                    </div>
                                </td>
                                <td>201812月份工资</td>
                                <td>
                                    <a href="javascript:;" v-on:click="detailShow(1)">详情</a>
                                    <a href="javascript:;" v-on:click="delete(3)">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>2</td>
                                <td>SRD20181240004</td>
                                <td>2018-12-20</td>
                                <td>工资</td>
                                <td class="text-navy">收入</td>
                                <td class="amount">590,0.00</td>
                                <td>
                                    <a href="javascript:;">建设银行</a>
                                </td>
                                <td>老板</td>
                                <td>-</td>
                                <td>孙总礼金</td>
                                <td>
                                    <a href="javascript:;" v-on:click="detailShow(1)">详情</a>
                                    <a href="javascript:;" v-on:click="delete(3)">删除</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div style="display: none;" v-show="pageInit">
                <!-- 新增收支 -->
                <modal v-bind:show.sync="addModal.show" v-bind:style="addModal .style" v-bind:add-class="addModal.addClass">
                    <h4 slot="header">新增收支</h4>
                    <div slot="body" class="clearfix">
                        <form class="form-horizontal m-t" novalidate="novalidate">
                            <div>
                                <h3 class="panel-title">基本信息</h3>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">单据编号</label>
                                <div class="col-sm-4">
                                    <input class="fill-item" placeholder="系统生成" type="text" readonly="readonly" />
                                </div>
                                <label class="col-sm-2 control-label">制单人</label>
                                <div class="col-sm-4">
                                    <input class="fill-item" value="老板" type="text" readonly="readonly" />
                                </div>
                               
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">结算账户</label>
                                <div class="col-sm-4">
                                    <select id="account">
                                        <option v-for="item in accountList" v-bind:value="item.Value" v-bind:selected="$index===0"
                                            v-text="item.Text"></option>
                                    </select>
                                </div>
                                <label class="col-sm-2 control-label">账目类型</label>
                                <div class="col-sm-4">
                                    <select v-select2 id="accountType">
                                        <option value='0'>全部</option>
                                        <option value='0'>工资</option>
                                        <option value='0'>通讯费</option>
                                        <option value='0'>电费</option>
                                        <option value='0'>水费</option>
                                        <option value='0'>基建</option>
                                        <option value='0'>燃气费</option>
                                        <option value='0'>福利费</option>
                                        <option value='0'>交通费</option>
                                        <option value='0'>招待费</option>
                                        <option value='0'>商务费</option>
                                        <option value='0'>出差补贴</option>
                                        <option value='0'>住宿费</option>
                                        <option value='0'>其他</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">收支类型</label>
                                <div class="col-sm-4">
                                    <select v-select2 id="incomeType">
                                        <option value='0'>收入</option>
                                        <option value='0'>支付</option>
                                    </select>
                                </div>
                                <label class="col-sm-2 control-label">金额</label>
                                <div class="col-sm-4">
                                    <input class="fill-item" type="text" />
                                </div>
                            </div>
                            <div>
                                <h3 class="panel-title">其他信息</h3>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">附件</label>
                                <div class="col-sm-8">
                                    <div class="file-loading">
                                        <input id="file-es" name="file-es[]" type="file">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-8">
                                        <textarea id="ccomment" name="comment" class="form-control" style="height: 56px;"></textarea>
                                </div>
                            </div>
                        </form>
                    </div>
                </modal>
                <!-- 日常收支 -->
                <modal v-bind:show.sync="detailModal.show" v-bind:style="detailModal .style" v-bind:add-class="detailModal.addClass">
                    <h4 slot="header">日常收支</h4>
                    <div slot="body" class="clearfix">
                        <div class="approve-detail-modal-title">
                            <h2 style="margin-top: 0px;">日常收支详情</h2>
                        </div>
                        <ul class="bill-tips clearfix">
                            <li class="w-100">
                                <em>单据编号</em>
                                <span>SRD20181220005</span>
                            </li>
                            <li class="w-100">
                                <em>账目类型</em>
                                <span>工资</span>
                            </li>
                            <li class="w-100">
                                <em>结算账户</em>
                                <span>建设银行</span>
                            </li>
                            <li class="w-100">
                                <em>收支类型</em>
                                <span class="amount">支出</span>
                            </li>
                            <li class="w-100">
                                <em>金额(元)</em>
                                <span class="amount">100,000,0.00</span>
                            </li>
                            
                            <li class="w-100">
                                <em>备注</em>
                                <span>建设银行</span>
                            </li>
                            <li class="w-100">
                                <em>附件</em>
                                <span><a href="javascript:;">点击查看附件</a></span>
                            </li>
                        </ul>
                        <div class="approve-detail-modal-title" style="padding: 20px"></div>
                        <ul class="bill-tips clearfix" style="margin-top: -15px;">
                            <li style="width: 145px;">
                                <em style="width: 50px;">制单时间</em>
                                <span>2018-12-22</span>
                            </li>
                            <li>
                                <em style="width: 36px;">制单人</em>
                                <span>王老板</span>
                            </li>
                        </ul>
                    </div>
                </modal>
                <!-- 审批进度 -->
                <modal v-bind:show.sync="approvalModal.show" v-bind:style="approvalModal .style" v-bind:add-class="approvalModal.addClass">
                    <h4 slot="header">审批进度</h4>
                    <div slot="body" class="clearfix">
                        <ul class="content">
                            <li class="isHandled approval">
                                <div>
                                    <div>
                                        <p class="link">申请已提交</p>
                                        <p><span class="time">2017-08-24 15:41</span></p>
                                    </div>
                                </div>
                            </li>
                            <li class="isHandled approval">
                                <div>
                                    <p class="link"><span>直属领导</span>&nbsp;&nbsp;&nbsp;<span class="people">[张珍珍]</span></p>
                                    <p>
                                        <span class="time">审批时间：2017-08-24 15:41</span><br>
                                        <span class="result_dec">处理结果：</span>
                                        <span style="color: #1ab394;">同意</span><br>
                                        <span class="result_dec">审批耗时：</span><span>0天0小时1分钟3秒（距离提交时间）</span><br>
                                        <span class="result_dec">审批备注：同意</span>
                                    </p>
                                </div>
                            </li>
                            <li class="isHandled is-reject approval">
                                <div>
                                    <p class="link"><span>财务经理</span>&nbsp;&nbsp;&nbsp;<span class="people">[饭饭]</span></p>
                                    <p>
                                        <span class="time">审批时间：2017-08-24 15:41</span><br>
                                        <span class="result_dec">处理结果：</span>
                                        <span class="amount">驳回</span><br>
                                        <span class="result_dec">审批耗时：</span><span>0天0小时1分钟3秒（距离提交时间）</span><br>
                                        <span class="result_dec">审批备注：<span class="amount">上传发票</span></span>
                                    </p>
                                </div>
                            </li>
                            <li class="is-noapproval approval">
                                <div>
                                    <p class="link"><span>财务经理</span>&nbsp;&nbsp;&nbsp;<span class="people">[饭饭]</span></p>
                                    <p>
                                        <span class="time">审批时间：</span><br>
                                        <span class="result_dec">处理结果：</span><span class="amount"></span><br>
                                        <span class="result_dec">审批耗时：</span><span></span><br>
                                        <span class="result_dec">审批备注：<span class="amount"></span></span>
                                    </p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </modal>
            </div>
        </div>
    </div>
    <script src="../../content/js/lib/vue/vue.min.js"></script>
    <script src="../../content/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="../../content/static/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="../../content/static/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="../../content/static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="../../content/static/js/content.min.js?v=1.0.0"></script>
    <script src="../../content/js/lib/calendar/calendar.js"></script>
    <script src="../../content/js/lib/calendar/scrollbar.js"></script>
    <script src="../../content/static/js/plugins/bootstrap-fileinput/js/fileinput.js"></script>
    <script src="../../content/static/js/plugins/bootstrap-fileinput/js/plugins/sortable.js"></script>
    <script src="../../content/static/js/plugins/bootstrap-fileinput/js/locales/zh.js"></script>
    <script src="../../content/js/lib/vue/vue-modal.js"></script>
    <script src="../../content/js/lib/vue/vue-pagination.js"></script>
    <script src="../../content/js/common.js"></script>
    <script src="../../content/js/lib/vue/select2.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#file-es').fileinput({
                language: 'zh',
                uploadUrl: '#',
                allowedFileExtensions: ['jpg', 'png', 'gif']
            });
            //时间验证
            var calObj = new $.Calendar({
                //time: true,
                skin: 'white'
            });

            $('#costTimeStart').focus(function () {
                var $this = $(this),
                    val = $this.val(),
                    endTime = $('#costTimeEnd').val();
                calObj.pick({
                    elem: this,
                    endDate: endTime
                });
            });
            $('#costTimeEnd').focus(function () {
                var $this = $(this),
                    val = $this.val(),
                    startTime = $('#costTimeStart').val();
                calObj.pick({
                    elem: this,
                    startDate: startTime
                });
            });
        });
        $("#accounts").select2({
            width: "220px"
        });
        $("#comeType").select2({
            width: "220px"
        });
        $("#status").select2({
            width: "220px"
        });
        $("#approveStatus").select2({
            width: "220px"
        });
        var vmData = {
            approvalModal: {
                show: false,
                style: {
                    width: '560px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.approvalModal.show = false;
                }
            },
            detailModal: {
                show: false,
                style: {
                    width: '480px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.detailModal.show = false;
                }
            },
            pruchModal: {
                show: false,
                style: {
                    width: '980px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.pruchModal.show = false;
                }
            },
            addModal: {
                show: false,
                style: {
                    width: '680px',
                    height: "auto"
                },
                addClass: 'scroll-modal',
                func: {
                    type: Function
                },
                close: function () {
                    vm.addModal.show = false;
                }
            },
            modelTitle: "",
            approveStatusList: [{
                    "Text": "全部",
                    "Value": "553",
                },
                {
                    "Text": "待项目经理审批",
                    "Value": "553",
                },
                {
                    "Text": "待CEO审批",
                    "Value": "553",
                },
                {
                    "Text": "待A仓Leader审批",
                    "Value": "553",
                },
                {
                    "Text": "待B仓Leader审批",
                    "Value": "553",
                },
                {
                    "Text": "待销售经理审批",
                    "Value": "553",
                },
            ],
            backStatusList: [{
                    "Text": "全部",
                    "Value": "553",
                },
                {
                    "Text": "未归还",
                    "Value": "360",
                }, {
                    "Text": "已归还",
                    "Value": "365",
                },
                {
                    "Text": "转销售",
                    "Value": "4105",
                }
            ],
            warehouseList: [{
                    "Text": "北京",
                    "Value": "553",
                },
                {
                    "Text": "上海",
                    "Value": "360",
                }, {
                    "Text": "大西洋大西洋大西洋大西洋大西洋大西洋大西洋",
                    "Value": "365",
                },
                {
                    "Text": "广州",
                    "Value": "4105",
                }, {
                    "Text": "北冰洋",
                    "Value": "510",
                },
                {
                    "Text": "深圳",
                    "Value": "3219",
                },
                {
                    "Text": "天津",
                    "Value": "99402",
                },
                {
                    "Text": "合肥",
                    "Value": "519",
                },
                {
                    "Text": "苏州",
                    "Value": "518",
                },
                {
                    "Text": "南京",
                    "Value": "517",
                },
                {
                    "Text": "无锡",
                    "Value": "525",
                },
                {
                    "Text": "大东北",
                    "Value": "528",
                },
                {
                    "Text": "大西北",
                    "Value": "533",
                },
                {
                    "Text": "非洲",
                    "Value": "538",
                },
                {
                    "Text": "欧洲",
                    "Value": "537",
                },
                {
                    "Text": "南美洲",
                    "Value": "536",
                }
            ],
            modelFlag: 0,
            selectProductItem: [],
            accountList: [{
                "Text": "中国银行",
                "Value": "1",
            }, {
                "Text": "建设银行",
                "Value": "2",
            }, {
                "Text": "农业银行",
                "Value": "3",
            }, {
                "Text": "工商银行",
                "Value": "4",
            }, {
                "Text": "现金",
                "Value": "5",
            }, ],
        };
        vmData = $.extend(vmData, baseData);
        var vmMothod = {
            init: function () {},
            approvalShow: function () {
                vm.approvalModal.show = true;
            },
            detailShow: function () {
                vm.detailModal.show = true;
            },
            pruchShow: function (obj) {
                vm.pruchModal.show = true;
                $("#backStatus").select2({
                    width: "160px"
                });
                $("#backStatus").val('').trigger('change'); //初始化
            },
            addShow: function () {
                vm.addModal.show = true;
                $("#incomeType").select2({
                    width: "187px"
                });
                $("#incomeType").val('').trigger('change'); //初始化
                $("#accountType").select2({
                    width: "187px"
                });
                $("#accountType").val('').trigger('change'); //初始化
                $("#account").select2({
                    width: "187px"
                });
                $("#account").val('').trigger('change'); //初始化
            },
            productChooseClick: function (e) {
                if (e.checked) {
                    vm.productChooseList.forEach(function (a, v) {
                        if (a.Id = v.Id)
                            vm.productChooseList.splice(v, 1);
                    });
                } else {
                    vm.productChooseList.push(e);
                }
            },
        };
        vmMothod = $.extend(vmMothod, baseCommonFunction);
        var vm = new Vue({
            el: '.content-container',
            data: vmData,
            methods: vmMothod
        });
        vm.init();
    </script>
</body>

</html>